package org.restoran.util;

import com.google.gson.Gson;

import java.io.IOException;import java.lang.Object;import java.lang.String;

/**
 * Created with IntelliJ IDEA.
 * User: Andrew Kononenko
 * Date: 18.11.13
 * Time: 22:33
 * To change this template use File | Settings | File Templates.
 */
public class ControllerUtil {

    public static final String OK = "{\"success\":true, \"data\":";
    public static final String ERROR = "{\"success\":false}";
    public static final String END_STREAM = "}";

    public static String printOk(Object message){
        Gson g = new Gson();
        return OK+g.toJson(message)+END_STREAM;
    }

    public static String printError(){
        return ERROR;
    }
}
